package com.biz.primus.app.erpbridge.controller;

import com.biz.primus.app.erpbridge.feign.PaymentFeignClient;
import com.biz.primus.base.support.rest.vo.JsonResult;
import com.biz.primus.model.payment.vo.req.SupportPaymentSyncReqVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * PaymentBridgeController
 *
 * @author JKLiues
 * @date 2017年11月17日
 */
@RestController
@RequestMapping("bridge/payment")
public class PaymentBridgeController extends BaseBridgeController{


    private final PaymentFeignClient paymentFeignClient;

    @Autowired
    public PaymentBridgeController(PaymentFeignClient paymentFeignClient) {
        this.paymentFeignClient = paymentFeignClient;
    }

    @PostMapping("handleSupportPayment")
    public JsonResult syncSupportPayment(List<SupportPaymentSyncReqVo> reqVos) {
        paymentFeignClient.syncSupportPayment(reqVos);
        return new JsonResult();
    }

}